package exp2;

import java.util.*;
import static java.lang.Math.*;

public class T4_1 {
    public static void main(String[] args) {
        ArrayList<Integer> L = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        System.out.print("L: ");
        String[] str;
        str = sc.nextLine().split(",");
        for(int i = 0; i < str.length; i++) {
            L.add(Integer.parseInt(str[i]));
        }
        //
        int lmax = L.get(0);
        int lmin = L.get(0);
        int sum = L.get(0);
        for (int i = 1; i < L.size(); i++) {
            lmax = max (L.get(i), lmax);
            lmin = min (L.get(i), lmin);
            sum = sum + L.get(i);
        }
        System.out.println("max: " + lmax);
        System.out.println("min: " + lmin);
        System.out.println("ave: " + (double)sum / L.size());
    }
}
